import Taro, { RealtimeLogManager } from "@tarojs/taro";
export class Logger {
    static manager:RealtimeLogManager;
    static init() {
        if(!Logger.manager) {
            Logger.manager = Taro.getRealtimeLogManager()
        }
    }


    static date() {
        return (new Date()).toLocaleString()
    }


    static info(...arg:any[]) {return
        Logger.init()
        Logger.manager.info(Logger.date(), ...arg)
    }

    static error(...arg:any[]) {return
        Logger.init()
        Logger.manager.error(Logger.date(), ...arg)
    }

    
}